package com.woniuxy.cloud.carl.carlgoods.client;

import com.woniuxy.cloud.carl.carlgoods.client.param.AddSkuParam;
import com.woniuxy.cloud.carl.carlgoods.client.param.ModifySkuParam;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;


@FeignClient(contextId = "SkuMannagerClient",name="carlgoods")
public interface SkuMannagerClient {

    @PostMapping("/addsku")
    public Result addsku(@RequestBody AddSkuParam param);


    @PostMapping("/modifySku")
    public Result modifySku(@RequestBody @Valid ModifySkuParam param);

@PostMapping(value = "/upload",headers = "content-type=multipart/form-data")
    public Result<String> skuUploadImage(MultipartFile file);
@GetMapping("/chengSkuStock")
public Result cahngeSkuStock(@RequestParam("skuId") Long skuId, @RequestParam("skuStock")Integer skuStock);
}
